// store/modules/user.js
export default {
  namespaced: true, // 启用命名空间
  state: {
    loginStatus:false,
    userName:"王五",
    token:"" || uni.getStorageSync("token")
  },
  mutations: {
    setUserName(state,playload){
    	state.userName = playload;
    },
    setToken(state,playload){
    	state.token = playload;
    },
    changeLoginStatus(state,playload){
    	state.loginStatus = playload.num;
    }
  },
  actions: {
    loginStatusAction(context,playload){
    	console.log(playload)
    	context.commit('changeLoginStatus',{num: playload.number})
    }
  },
  
};
